{{ $word := ((.Get 0) | default "") }}
{{ $source := ((.Get 1) | default "") }}
{{ $url := (urls.Parse $.Site.BaseURL) }}
{{ if (eq $source "local") }}{{ $source = $url.Host }}{{ end }}

<div class="shortcode shortcode-form shortcode-{{ ($.Name) }} mb-3">
  <div class="row row-cols-1 row-cols-lg-2 g-3">
    <div class="col">
      <form action="https://google.com/search" method="get" target="_blank">
        <input type="hidden" name="domains" value="{{ $source }}"/>
        <input type="hidden" name="sitesearch" value="{{ $source }}"/>
        <div class="input-group">
          <span class="input-group-text"><i class="fas fa-search fa-fw"></i></span>
          <input type="search" class="form-control" name="q" value="{{ $word }}"/>
        </div>
      </form>
    </div>
  </div>
</div>
